package com.boot.wechat.util;

import java.io.IOException;
import java.util.Properties;

/**
 * @Author Create by wuyanshen
 * @Date 2018-08-09 下午4:06
 * @Description <描述>
 */
public class ConfigUtil {
    private static Properties props = new Properties();

    static {
        try {
            props.load(Thread.currentThread().getContextClassLoader()
                    .getResourceAsStream("wechat.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String get(String key) {
        return props.getProperty(key);
    }

    public static void setProps(Properties p) {
        props = p;
    }
}
